import { request } from "../untils/request.js";
import usersapi from "./users.js";
export default {
    // 订单列表
    orderList: ({ curPage, eachPage }) =>
        request({
            url: "/api/order/orderList",
            type: "GET",
            data: { curPage, eachPage }
        })
    ,
    // 根据电影查询订单
    searchMove: (moveName) => request({
        type: "get",
        url: "/api/order/searchMove",
        data: { moveName }
    }),
    // 新增订单/orderseat
    addOrder: orderdata =>
        request({
            type: "POST",
            url: "/api/order/addorder",
            data: orderdata
        }),
    // 选座/changestatus
    changeseat: schedules =>
        request({
            type: "get",
            url: "/api/order/orderseat",
            data: { schedules }
        }),
    // 改变状态/getseatingOne
    changestatus({ _id, status } = {}) {
        return request({
            type: "post",
            url: '/api/order/changestatus',
            data: { _id, status }
        })
    },
    // 获取某一个座位searchMove
    getseatingOne: (_id) => request({
        type: "get",
        url: "/api/order/getseatingOne",
        data: { _id }
    }),
}